<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>商品信息列表</title> <%@ include file="/page/include.jsp"%>
<link type="text/css" rel="stylesheet" href="<%=basePath%>/statics/plugins/bootstrap-switch/bootstrap-switch.min.css" />
<link href="<%=basePath%>/statics/css/webform.css?v=20180104" rel="stylesheet" />
<script src="<%=basePath%>/statics/js/bootstrap-filestyle.min.js" type="text/javascript"></script>
<script type="text/javascript">
var SystemImgPath = '<%=PublicConfig.IMG_ROOT_URL%>';
</script>
</head>
<body class="nav-md">
	<div class="container body">
		<div class="main_container">
			<div class="framebody" role="main">
				<input type="hidden" id="opt_status" />
				<div class="row">
					<div class="col-md-12 col-sm-12 col-xs-12">
						<div class="x_panel">
							<div class="x_title">
								<h2>
									<i class="fa fa-pencil fa-fw"></i>查询条件 <small></small>
								</h2> 
								<div class="clearfix"></div>
							</div>
							<div class="x_content">
								<form id="productSearchForm" action="<%=basePath%>/product/expProductSort" method="post" class="form-horizontal form-label-left">
									<div class="form-group">
										<label class="control-label col-md-2" for="productName">商品名称：</label>
										<div class="col-md-2">
											<input type="text" id="productName" name="productName" class="form-control col-md-12" placeholder="请输入商品名称">
										</div>
										<label class="control-label col-md-2" for="productCategoryCode">商品分类：</label>
										<div class="col-md-2">
											<input id="productCategoryId" name="productCategoryId" placeholder="商品分类" type="hidden">
											<input id="productCategoryName" readonly="readonly" name="productCategoryName" class="form-control col-md-12" placeholder="请选择商品分类" type="text">
											<i class="glyphicon glyphicon-chevron-down" style="z-index: 100;padding-left: 90%;margin-top: -25px;" onclick="javascript: doChoseProductCategory();"></i>
										</div>
										<label class="control-label col-md-2" for="productStatus">商品状态：</label>
										<div class="col-md-2">
											<select class="selectpicker form-control col-md-12" id="productStatus" name="productStatus">
												<option value="">全部</option>
												<option value="1">上架</option>
												<option value="2">预售中</option>
												<option value="0">已售罄</option>
												<option value="3">下架</option>
											</select>
										</div>
									</div>
									
									<div class="form-group">
										<label class="control-label col-md-2" for="promotionTag">活动标签：</label>
										<div class="col-md-2">
											<select class="selectpicker form-control col-md-12" id="promotionTag" name="promotionTag" placeholder="请选择活动标签">
											</select>
										</div>
										<label class="control-label col-md-2" for="productCode">商品编码： </label>
										<div class="col-md-2">
											<input type="text" id="productCode" name="productCode" class="form-control col-md-12" placeholder="请输入商品编码">
										</div>
										<label class="control-label col-md-2" for="brand">商品品牌：</label>
										<div class="col-md-2">
											<select class="selectpicker form-control col-md-12" id="brand" name="brand" placeholder="请选择商品品牌">
											</select>
										</div>
									</div>
									<div class="form-group">
										<div class="col-md-12">
											<div class="pull-right">
												<a class="btn btn-danger" id="btnClear"><i class="fa fa-trash-o fa-fw"></i>清空</a> 
												<a class="btn btn-primary search" id="btnQuery"><i class="fa fa-search-plus fa-fw"></i>查询</a>
											</div>
										</div>
									</div>
								</form>
							</div>
						</div>
					</div>
				</div>
				<div class="row">
					<div class="col-md-12 col-sm-12 col-xs-12">
						<div class="x_panel">
							<div class="x_title">
								<h2>
									<i class="fa fa-reorder fa-fw"></i>商品信息列表 <small></small>
								</h2>
								<div class="clearfix"></div>
							</div>
							
							<div class="x_content">
								<div class="row" style="padding-bottom: 10px;">
									<div class="btn-group">
										<button type="button" class="btn btn-success btn-sm" id="btnAdd">
											<i class="fa fa-plus"></i>&nbsp;新增
										</button>
										&nbsp;&nbsp;
									</div>
									<div class="btn-group">
										<button type="button" class="btn btn-success btn-sm" id="btnCopy" onclick="doCopyProBatch();">
											<i class="fa fa-copy"></i>&nbsp;复制
										</button>
										&nbsp;&nbsp;
									</div>
									<div class="btn-group">
										<button type="button" class="btn btn-primary btn-sm">批量操作</button>
										<button type="button" class="btn btn-primary btn-sm dropdown-toggle" data-toggle="dropdown" style="height: 29.6px;">
											<span class="caret"></span> <span class="sr-only">AAA</span>
										</button>
										<ul class="dropdown-menu" role="menu">
											<li><a href="javascript: void(0);" onclick="javascript: doExpProduct();">导出商品排序</a></li>
											<li><a href="javascript: void(0);" onclick="javascript: doImpProduct();">导入商品排序</a></li>
											<li class="divider"></li>
											<li><a href="javascript: void(0);" onclick="javascript: doDelProBatch();">删除</a></li>
										</ul>
									</div>
									<div class="btn-group">
										<button type="button" class="btn btn-primary btn-sm">商品状态</button>
										<button type="button" class="btn btn-primary btn-sm dropdown-toggle" data-toggle="dropdown" style="height: 29.6px;">
											<span class="caret"></span> <span class="sr-only">AAA</span>
										</button>
										<ul class="dropdown-menu" role="menu">
											<li><a href="javascript: void(0);" onclick="javascript: doModifyProductStatusBatch(1);">上架</a></li>
											<li><a href="javascript: void(0);" onclick="javascript: doModifyProductStatusBatch(2);">预售中</a></li>
											<li class="divider"></li>
											<li><a href="javascript: void(0);" onclick="javascript: doModifyProductStatusBatch(0);">已售罄</a></li>
											<li><a href="javascript: void(0);" onclick="javascript: doModifyProductStatusBatch(3);">下架</a></li>
										</ul>
									</div>
								</div>
								<div class="row">
									<table id="productTable" class="table"></table>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>






	<%-- 导入弹出框 begin --%>
	<div class="modal fade" id="editModal" tabindex="-1" data-backdrop="static" role="dialog" aria-labelledby="editModalLabel" aria-hidden="true">
		<div class="modal-dialog" style="width: 60%; min-height: 250px; height: 300px; max-height: 200px;">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
					<h4 class="modal-title" id="editModalLabel">导入</h4>
				</div>
				<div class="modal-body">
					<div class="row">
						<div class="col-md-12 col-sm-12 col-xs-12">
							<div class="x_panel">
								<div class="x_title">
									<h2>
										<i class="fa fa-pencil fa-fw"></i>导入 <small></small>
									</h2>
									<div class="clearfix"></div>
								</div>
								<div class="x_content">
									<form id="pointImportFrom" name="pointImportFrom" method="post" enctype="multipart/form-data" action="<%=basePath%>/product/impProductSort">
										<div class="form-group">
											<label class="control-label col-md-2 txtRight padTop8" for="file">文件选择： </label>
											<div class="col-md-4">
												<input name="file" id="file" type="file" />
											</div>
											<div class="col-md-2">
												<input type="submit" class="btn btn-success" value="上传" />
											</div>
										</div>
									</form>
								</div>
							</div>
						</div>
					</div>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
				</div>
			</div>
		</div>
	</div>
	<%-- 导入弹出框 end --%>

	<%-- 导入结果弹出框 begin --%>
	<div class="modal fade" id="productImpModal" tabindex="-1" data-backdrop="static" role="dialog" aria-labelledby="productImpModalLabel" aria-hidden="true">
		<form action="#" class="form-horizontal form-label-left">
			<div class="modal-dialog" style="width: 50%; min-height: 450px; height: 500px; max-height: 500px;">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
						<h4 class="modal-title" id="productImpModalLabel">商品导入结果</h4>
					</div>
					<div class="modal-body">
						<div id="productImpMsg">${msg }</div>
					</div>
					<div class="modal-footer">
						<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
					</div>
				</div>
			</div>
		</form>
	</div>
	<%-- 导入结果弹出框 end --%>


	<script src="${rootPath}/js/product/product_list.js?v=20180428"></script>
</body>
</html>